package cn.xiaopengstack.infrastructure.persistent.dao;

import cn.xiaopengstack.domain.strategy.model.entity.StrategyAwardEntity;
import cn.xiaopengstack.infrastructure.persistent.po.StrategyAward;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author jiangyangang
* @description 针对表【strategy_award】的数据库操作Mapper
* @createDate 2025-06-10 17:17:49
* @Entity generator.domain.StrategyAward
*/
@Mapper
public interface IStrategyAwardDao {

    /**
     * 获取策略下的奖品列表
     * @param strategyId
     * @return
     */
    List<StrategyAward> queryStrategyAwardList(@Param("strategyId") Long strategyId);

    /**
     * 查询对应奖品的规则
     * @param strategyAward
     * @return
     */
    String queryStrategyAwardRuleModels(StrategyAward strategyAward);

    /**
     * 更新奖品库存
     * @param strategyId
     * @param awardId
     * @param decrStock
     * @return
     */
    int updateStrategyAwardStock(@Param("strategyId") Long strategyId, @Param("awardId") Integer awardId, @Param("decrStock") Integer decrStock);

    /**
     * 查询奖品信息
     * @param strategyId
     * @param awardId
     * @return
     */
    StrategyAward queryStrategyAward(@Param("strategyId") Long strategyId, @Param("awardId") Integer awardId);
}




